{#- vim: set et ts=8 sts=4 sw=4 ai: -#}
{% if toc -%}
    <details class="collapse-panel" open>
        <summary class="collapse-header">
            On this page
        </summary>

        <div class="collapse-content">
            {% for count, html, level, text, anchor in toc %}
            <a href="#{{anchor}}" class="sidebar-link sidebar-toc-{{level}}{%if loop.first%} sidebar-active{% endif %}">{{text}}</a>
            {% endfor %}
        </div>
    </details>
{%- endif %}
